package com.lrkj.back.service.impl;

import java.util.List;
import java.util.Map;

import com.lrkj.back.entity.ZsWupinBaoFafang;
import com.lrkj.back.mapper.ZsWupinBaoFafangMapper;
import com.lrkj.back.service.ZsWupinBaoFafangService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.com.cbons.mamisay.parent.db.api.DBInterface;
import cn.com.cbons.mamisay.parent.exception.DBException;
import cn.com.cbons.mamisay.parent.service.base.ParentServiceImpl;

import com.github.pagehelper.PageInfo;

@Transactional
@Service
public class ZsWupinBaoFafangServiceImpl extends ParentServiceImpl<ZsWupinBaoFafang> implements ZsWupinBaoFafangService {

    @Autowired
    private ZsWupinBaoFafangMapper baofafangMapper;

    @Override
    protected DBInterface<ZsWupinBaoFafang> getDao() throws DBException {
        return baofafangMapper;
    }

    @Override
    public PageInfo<ZsWupinBaoFafang> findAllfafangwuping(Map<String, Object> map) throws DBException {
        // TODO Auto-generated method stub
        return baofafangMapper.findAllBaoDetail(map);
    }

    @Override
    public List<ZsWupinBaoFafang> findAllWupinbao(Map<String, Object> map) throws DBException {
        // TODO Auto-generated method stub
        return baofafangMapper.findAllBao(map);
    }

    @Override
    public int insertPiliang(List<ZsWupinBaoFafang> shoushubao) throws DBException {
        // TODO Auto-generated method stub
        return baofafangMapper.insertPiliang(shoushubao);
    }

    @Override
    public void deleteByFfls(String fafangliushi) throws DBException {
        // TODO Auto-generated method stub
        baofafangMapper.deleteByFfls(fafangliushi);
    }
}
